<template>
    <div class="mini-hotel-item">
        <div class="img-container">
            <img class="imgStyle" :src="imageUrl" alt="">
        </div>
        <div class="hotel-info">
            <div class="hotel-name">{{ hotelName }}</div>
            <div class="hotel-address">{{ hotelAddress }}</div>
            <div class="priceAndRate">
                <div><el-rate disabled size="large" v-model="phoneRate" /></div>
                <div class="door-price">
                    <span class="real-door-price">门市价{{ originalPrice }}</span><span>¥<span class="real-price">{{ discountedPrice }} </span>起</span>
                </div>
            </div>
        </div>
        <div class="juli-tag">
            <el-tag type="primary" round>{{ distance }}</el-tag>
        </div>
    </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'

const phoneRate = ref(4)
// 定义 props
const props = defineProps({
    imageUrl: String,
    hotelName: String,
    hotelAddress: String,
    originalPrice: Number,
    discountedPrice: Number,
    distance: String
})
</script>

<style lang="scss" scoped> 
.mini-hotel-item{
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    border-radius: 0 0 10px 10px !important;
    box-shadow: 0px 4px 10px 0px #EDF3FD;
    border-radius: 5px;
    margin-bottom: 20px;
    .img-container{
        width: 100%;
        border-radius: 10px 10px 0 0;
        .imgStyle{
            width: 100%;
        border-radius: 10px 10px 0 0;

            object-fit: cover;
        }
    }
    .hotel-info{
        width: 100%;
        padding: 10px 20px;
        .hotel-name{
            font-size: 24px;
            font-weight: 500;
            margin-bottom: 6px;
            .el-rate{
                margin-left: 10px;
                font-size: 24px;
            }
        }
        .hotel-address{
            margin-bottom: 6px;

            color: #817F7F;
        }
        .priceAndRate{
            display: flex;
            align-items: center;
            justify-content: space-between;
            .door-price{
                
                .real-door-price{
                    font-size: 12px;
                    margin-right: 5px;
                    color: #817F7F;
                    text-decoration: line-through;
                }
                //删除线
                
                span{
                    color: #356CEB;
                    font-size: 16px;
                    
                }
                .real-price{
                    color: #356CEB;
                    font-weight: 600;
                    font-size: 24px;
                }
            }
        }
    }
    .juli-tag{
        position: absolute;
        top: 20px;
        right: 20px;
        color: #356CEB;
        border-radius: 10px;
        font-weight: 600;
    }
}
</style>